package com.znyj.cloud.device.task;


import com.znyj.cloud.chain.util.CheckUtil;
import com.znyj.cloud.device.constant.SysConstant;
import org.apache.log4j.Logger;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by gaoliwei02 on 17/6/19.
 */
@Component
public class ShowTimer {
    private static final Logger logger = Logger.getLogger(ShowTimer.class);

    @Scheduled(cron = "0/60 * * * * ?")
    public void ShowTimer() {
        if (SysConstant.DEBUG_DISPLAY)
            logger.error(CheckUtil.monitorReport(SysConstant.ERROR_CODE.ONLINE_COUNT, "", (long) OnlineDeviceInfoMapping.getOnlineDeviceCount()));

    }


}
